<?php 

 // uruchomienie profailera
      
 // ustawienie bledow

abstract class ORMConneciton {

    /**
      * mixed - Handle to connection
      */
    protected $resource = null; 

    /**
      * name of connection
      */
    protected $name = "" ;

    protected $connectionString = "" ;

    protected $login ;
    protected $password ;

    protected $profilerOn = false ;
    protected $errorOn = true;
    protected $isConnected = false ;

    public function fromXML( SimpleXMLElement $xmlConnection ) {
            throw new Exception("to code");
    }

    public function toXml() { 
        $sxe = new SimplXMLElement();
        $sxe->addAtribute( "profilerOn", $this->profilerOn  );
        //$sxe->addAtr
        throw new Exception("TODO: ");
    } 

    public function getResource( ) {
        return $this->resource ;
    }

    public function setCredentials( $user, $password ) {
        $this->user = $user;
        $this->password = $password ;
    }

    public function setConnectionString( $connectionString ) {
        $this->connectionString = $connectionString ;
    }

    public abstract function connect() ;

    public abstract function dissconnect();


}

?>
